package com.example.consumer;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


/**
 * @author desire
 */
@Component
public class RoutingConsumer {

    @RabbitListener(queues = {"queue"})
    public void handler(Message message) {
        System.out.println("消息： " + new String(message.getBody()));
    }
}
